package ru.tennisworld.match.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Named;
import org.springframework.beans.factory.annotation.Autowired;
import ru.tennisworld.match.configs.MapStructConfig;
import ru.tennisworld.match.dto.references.BaseReferenceDto;
import ru.tennisworld.match.dto.references.MatchStageReferenceDto;
import ru.tennisworld.match.entities.base.BaseReferenceEntity;
import ru.tennisworld.match.entities.references.MatchStage;
import ru.tennisworld.match.services.ReferenceService;

@Mapper(config = MapStructConfig.class,
        uses = {})
public abstract class ReferenceMapper {

    @Autowired
    private ReferenceService referenceService;

    @Named("matchStageMapper")
    @Mapping(target = "name", source = "name")
    @Mapping(target = "code", source = "code")
    public abstract MatchStageReferenceDto mapToReferenceDto(MatchStage entity);
}
